negotiator.boaframework
Class SessionData

java.lang.Object
  extended by negotiator.boaframework.SessionData
All Implemented Interfaces:
java.io.Serializable

public class SessionData
extends java.lang.Object
implements java.io.Serializable

In a BOAagent each component should be able to store data to be used in the next negotiation session. Unfortunately, the ANAC2013 implementation only allows us to store a single object. Therefore, this object packs the object of each of the three BOA components (bidding strategy, etc.) together as a single object.

Author:
Mark Hendrikx
See Also:
Serialized Form

Constructor Summary
SessionData()
           
 
Method Summary
 void changesCommitted()
          Sets that all changes have been processed.
 java.io.Serializable getData(ComponentsEnum type)
          Returns the data stored by the given BOA component.
 boolean isChanged()
           
 boolean isEmpty()
           
 void setData(ComponentsEnum component, java.io.Serializable data)
          Method used to set the data to be saved by a BOA component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionData

public SessionData()
Method Detail

getData

public java.io.Serializable getData(ComponentsEnum type)
Returns the data stored by the given BOA component.

Parameters:
type - of the BOA component.
Returns:
component saved by this BOA component, null is no object saved.

setData

public void setData(ComponentsEnum component,
                    java.io.Serializable data)
Method used to set the data to be saved by a BOA component. This method should not be called directly, use the storeData() and loadDate() of the component instead.

Parameters:
component - from which the data is to be saved.
data - to be saved.

isEmpty

public boolean isEmpty()
Returns:
true if save was saved by a component.

isChanged

public boolean isChanged()
Returns:
true if object was after its creation.

changesCommitted

public void changesCommitted()
Sets that all changes have been processed.